import requests

# 目标url
url = "https://www.baidu.com"
# 发送get请求
response = requests.get(url)
# 尝试使用不同的方式解码响应内容
try:
    content = response.content.decode()
except UnicodeDecodeError:
    try:
        content = response.content.decode('utf-8')
    except UnicodeDecodeError:
        content = response.text
# 打印解码后的内容
print(content)


